package com.sky.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.sky.entity.Setmeal;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 套餐 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-07-22
 */
public interface SetmealMapper extends MPJBaseMapper<Setmeal> {

     @Select("select sd.name, sd.copies, d.image, d.description " +
             "from setmeal_dish sd left join dish d on sd.dish_id = d.id " +
             "where sd.setmeal_id = #{setmealId}")
     List<DishItemVO> getDishItemBySetmealId(Long setmealId);
}
